package com.hcss.common.util;

import java.io.IOException;

import javax.servlet.ServletOutputStream;

public class ExportUtil {
	 /**
	  * 实现页面下载
	  * @param content
	  * @param outputStream
	  * @return
	  */
	 public static boolean writefile(StringBuffer content,ServletOutputStream outputStream){
			try{
				outputStream.write(content.toString().getBytes());
				
				outputStream.flush();
				outputStream.close();
				return true;
			}catch(Exception e){
				e.printStackTrace();
				return false;
			}finally {
				try {
					outputStream.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
	    }
}
